package com.oa.hyperion.vo;

import com.oa.hyperion.entity.Controller;
import com.oa.hyperion.entity.ControllerTemplateMerge;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * @author Liu
 * @date 2022年01月17日 16:52
 */
@Getter
@Setter
@ApiModel("模板内容")
public class TemplateVo {
    @ApiModelProperty(name = "title",value = "当前标签的标题")
    private String title;
    @ApiModelProperty(name = "labels",value = "当前的标签类型")
    private String style;
    @ApiModelProperty(name = "type",value = "input的type类型，如果当前标签不是input则为空")
    private String icon;
    @ApiModelProperty(name = "options",value = "select的options，如果当前标签不是select则为空")
    private String options;
    @ApiModelProperty(name = "sorting", value = "当前标签在模板中为顺位")
    private Integer sorting;

    public TemplateVo(Controller controller, ControllerTemplateMerge controllerTemplateMerge) {
        this.title = controllerTemplateMerge.getTitle();
        this.style = controller.getStyle();
        this.icon = controller.getIcon();
        this.options = controllerTemplateMerge.getOptions();
        this.sorting = controllerTemplateMerge.getSorting();
    }
}
